<template>
    <div class="top full_page">
        <cube-scroll ref="scroll">
            <div>


        <div class="header">
            <img src="./header.png" alt="">
        </div>

        <div class="items">
            <item v-for="(item,index) in items" :item="item" :key="index" :is-top="true" style="margin-top: 10px"/>
        </div>
    </div>
        </cube-scroll>
    </div>
</template>

<script>
    import {getList} from "../../api/home";
    import item from '../../components/item'
    export default {
        name: "index",
        components:{
            item
        },
        data(){
          return {
              items:[]
          }
        },
        created(){
          this.getList()
        },
        methods:{
            getList(){
                let page = 1
                let limit = 100
                let sidx = 'sort_index'
                getList({page,limit,sidx}).then(res=>{
                    this.items = res.data
                })
            }
        }
    }
</script>

<style type="text/css" lang="stylus">
    .top
        .header
            height 120px
            font-size 0
            background-color #FF5D60
            img
                width 100%
        .items
            overflow hidden
            background-color #FF5D60
            padding 0 10px

</style>
